﻿@model List<eProjectsSemIII.Models.Competitions>
<div class="path_menu">
    <div class="path_menu_item">
        <a href="@Url.Content("~/administrator/")">Home Page</a>
    </div>
    <div class="path_menu_item">
        <a href="@Url.Content("~/administrator/competitions/")">Competitions</a>
    </div>
    <div class="path_menu_item">
        <a href="@Url.Content("~/administrator/competitions/")">List of competition</a>
    </div>
</div>
<div class="path_menu title_and_action">
    <div class="content_title">
        List of competition
    </div>
    <div class="content_action">
        <div class="item_content_action">
            <a href="#">
                <div class="img_item_content_action" id="help_action">
                </div>
                <div class="text_item_content_action">
                    Help
                </div>
            </a>
        </div>
        <div class="item_content_action">
            <a href="@Url.Content("~/administrator/")">
                <div class="img_item_content_action" id="go_back_action">
                </div>
                <div class="text_item_content_action">
                    Go back
                </div>
            </a>
        </div>
        <div class="item_content_action">
            <a href="@Url.Content("~/administrator/competitions/add/")">
                <div class="img_item_content_action" id="add_action">
                </div>
                <div class="text_item_content_action">
                    Add
                </div>
            </a>
        </div>
    </div>
    <!--#END content_action-->
</div>
<!--#END path_menu title_and_action-->
@if (ViewBag.pagingString != "" && ViewBag.pagingString != null)
{
<div class="path_menu">
    <div class="paging">
        @Html.Raw(ViewBag.pagingString)
    </div>
</div>
}
@if (Session["error"] != null)
{
    <div class="path_menu error">
        @Session["error"]
        @{Session["error"] = null;}
    </div>
}
<!--===================================CHO DANH CHO VIEC SHOW FORM=================================================-->
<div class="path_menu">
    <div class="list_item">
        <table>
            <tr class="table_title">
                <td class="text-center">No.</td>
                <td class="text-left">Name</td>
                <td class="text-center">Start Date</td>
                <td class="text-center">Deadline Date</td>
                <td class="text-center">End Date</td>
                <td class="text-center">Kind</td>
                <td class="text-center">Conditions</td>
                <td class="text-center">Awards</td>
                <td class="text-center">Designs</td>
                <td class="text-center edit">Edit</td>
                <td class="text-center">Delete</td>
            </tr>
            @{
                ViewBag.i = 0;
            }
            @foreach (var competition in Model)
            {
            <tr>
                <td class="text-center num-id">@{ViewBag.i++;} @ViewBag.i</td>
                <td class="text-left">@competition.Name</td>
                <td class="text-center">@competition.StartDate.ToString("dd-MMM-yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("en-US"))</td>
                <td class="text-center">@competition.DeadlineDate.ToString("dd-MMM-yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("en-US"))</td>
                <td class="text-center">@competition.EndDate.ToString("dd-MMM-yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("en-US"))</td>
                <td class="text-center"><a href="@Url.Content("~/administrator/kinds/kindcompetition/"+competition.ID)">Kind</a></td>
                <td class="text-center"><a href="@Url.Content("~/administrator/conditions/conditioncompetition/" + competition.ID)">Conditions</a></td>
                <td class="text-center"><a href="@Url.Content("~/administrator/awards/awardcompetition/" + competition.ID)">Awards</a></td>
                <td class="text-center"><a href="@Url.Content("~/administrator/designs/designcompetition/" + competition.ID)">Designs</a></td>
                <td class="text-center">
                @if (competition.DeadlineDate > DateTime.Now)
                {
                    <a href="@Url.Content("~/administrator/competitions/edit/" + competition.ID)">
                        <img alt="" src="@Url.Content("~/Content/Images/admins/menu-icon/edit_icon_20.png")" />
                    </a>
                }
                </td>
                <td class="text-center">
                    <a href="@Url.Content("~/administrator/competitions/delete/"+competition.ID)">
                        <img alt="" src="@Url.Content("~/Content/Images/admins/menu-icon/edit_icon_20.png")" />
                    </a>
                </td>
            </tr>
            }
        </table>
    </div>
</div>

@if (ViewBag.pagingString != "" && ViewBag.pagingString != null)
{
<div class="path_menu">
    <div class="paging">
        @Html.Raw(ViewBag.pagingString)
    </div>
</div>
}
<!--================================#END CHO DANH CHO VIEC SHOW FORM===============================================-->
<div class="path_menu title_and_action">
    <div class="content_title">
        List of competition
    </div>
    <div class="content_action">
        <div class="item_content_action">
            <a href="#">
                <div class="img_item_content_action" id="help_action1">
                </div>
                <div class="text_item_content_action">
                    Help
                </div>
            </a>
        </div>
        <div class="item_content_action">
            <a href="@Url.Content("~/administrator/")">
                <div class="img_item_content_action" id="go_back_action1">
                </div>
                <div class="text_item_content_action">
                    Go back
                </div>
            </a>
        </div>
        <div class="item_content_action">
            <a href="@Url.Content("~/administrator/competitions/add/")">
                <div class="img_item_content_action" id="add_action1">
                </div>
                <div class="text_item_content_action">
                    Add
                </div>
            </a>
        </div>
    </div>
    <!--#END content_action-->
</div>
<!--#END path_menu title_and_action-->
